<?
	$sql = $mysqlclass->mysql_my_query("SELECT * FROM `".$setupdata['table_prefix']."local_vars` WHERE `name`='smarty_caching_time'", __LINE__, __FILE__);
	if (mysql_num_rows($sql) == 0) $sql = $mysqlclass->mysql_my_query("INSERT INTO `".$setupdata['table_prefix']."local_vars` ( `id` , `name` , `value` ) VALUES ('', 'smarty_caching_time', '".time()."')", __LINE__, __FILE__);
	else $sql = $mysqlclass->mysql_my_query("UPDATE `".$setupdata['table_prefix']."local_vars` SET `value`='".time()."' WHERE `name` = 'smarty_caching_time'", __LINE__, __FILE__);

	function deldir($dir) {
		$dh=opendir($dir);
		while ($file=readdir($dh)) {
			if($file!="." && $file!="..") {
				$fullpath=$dir."/".$file;
				if(!is_dir($fullpath)) @unlink($fullpath);
				else deldir($fullpath);
			}
		}
		closedir($dh);
		if(rmdir($dir)) return true;
		else return false;
	} 
	
	if (file_exists($setupdata['binary_path']."/customs/ver.php")) deldir($setupdata['binary_path']."/customs");
	
?>